<?php
/**
 * CreateUser: zlh
 * CreateTime: 2022/2/2 15:11
 * Remark:
 */

namespace App\Http\Controllers\Auth;

use App\Consts\ResponseConsts\ResponseStatusConsts;
use App\Func\ResponseFunc;
use App\Http\Controllers\Controller;
use App\Service\Auth\AuthMenuService;
use JetBrains\PhpStorm\Pure;

class AuthMenuController extends Controller
{
    private AuthMenuService $_authMenuService;

    #[Pure] public function __construct()
    {
        $this->_authMenuService = new AuthMenuService();
    }

    /**
     * 获取权限菜单菜单
     * @return \Illuminate\Http\JsonResponse
     */
    public function getAuthMenuMenu(): \Illuminate\Http\JsonResponse
    {
        return ResponseFunc::returnJson(
            'ok',
            $this->_authMenuService->getAuthMenuMenu(),
            '获取权限菜单成功',
            ResponseStatusConsts::OK_200_RESPONSE_STATUS
        );
    }
}